package com.chen.utils;

import cn.hutool.core.net.NetUtil;
import cn.hutool.core.util.StrUtil;
import com.chen.base.module.redis.annotation.ExcludeRedis;
import com.chen.base.utils.PropertyUtil;
import com.chen.common.feign.annotation.EnableProFeignClients;
import com.chen.common.swagger.annotation.EnableSwaggerServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @author Long
 */
@Slf4j
@ExcludeRedis
@EnableSwaggerServer
@EnableProFeignClients
@SpringBootApplication
public class ChenUtilsApplication {
    public static void main(String[] args) {
        SpringApplication.run(ChenUtilsApplication.class, args);

        String port = PropertyUtil.getProperty("server.port");
        port = StrUtil.isNotBlank(port) ? port : "8080";
        String hostStr = NetUtil.getLocalhostStr();

        log.info(StrUtil.format("代码生成平台: http://{}:{}/genCode.html", hostStr, port));
        log.info(StrUtil.format("JSON格式化工具: http://{}:{}/json.html", hostStr, port));
        log.info(StrUtil.format("XML 格式化工具: http://{}:{}/xml.html", hostStr, port));
    }
}
